/**
 * 
 */
package com.kunbo.cn.dao.core.inventory;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;

import com.kunbo.cn.entity.core.inventory.Organization;
import com.kunbo.cn.entity.system.Depart;
import com.kunbo.cn.entity.system.Menu;

/**
 *
 * @author bjl  
 * @date 2019年2月27日 
 */
public interface OrganizationDao extends CrudRepository<Organization, String>,JpaRepository<Organization, String>,JpaSpecificationExecutor<Organization>{
	/**
	 * 自定义条件查询
	 * <p>Title: findUserInfo</p>
	 * <p>Description: </p>
	 * @param tel
	 * @param pageable
	 * @return
	 */
//	@Query("select u.name,d.address,d.tel  from User u , UserInfo d " +
//            "where u.id = d.userId  and  d.tel = ?1 ")
//    List<Object> findUserInfo(String tel, Pageable pageable);
	
	/**
	 * 
	 * <p>Title:name</p>
	 * <p>Description:根据名称模糊查询部门 </p>
	 * @param lastname
	 * @param pageable
	 * @return
	 */

    Page<Organization> findByTitleLike(String title, Pageable pageable);
 

}
